package Cm818_Zj_Mi;

/** 
 GetLength ��ժҪ˵����
*/
public class GetLength
{
	public GetLength()
	{
		//
		// TODO: �ڴ˴���ӹ��캯���߼�
		//
	}

	public final int tempname(String a)
	{
		String[] b = a.split("[|]", -1);
		int count = 5;
		for (String c : b)
		{
			try
			{
				int o = Integer.parseInt(c);
				switch (count)
				{
					case 5:
						return FiveGet(b);
					case 4:
						return FourGet(b);
					case 3:
						return ThereGet(b);
					case 2:
						return TwoGet(b);
					case 1:
						return OneGet(b);
				}
			}
			catch (java.lang.Exception e)
			{
				count--;
			}
		}
		return 0;
	}
	private int FiveGet(String[] xx)
	{
		return xx[4].length() * xx[3].length() * xx[2].length() * xx[1].length() * xx[0].length();
	}
	private int FourGet(String[] xx)
	{
		return xx[4].length() * xx[3].length() * xx[2].length() * xx[1].length();
	}
	private int ThereGet(String[] xx)
	{
		return xx[4].length() * xx[3].length() * xx[2].length();
	}
	private int TwoGet(String[] xx)
	{
		return xx[4].length() * xx[3].length();
	}

	private int OneGet(String[] xx)
	{
		return xx[4].length();
	}


}